﻿@model BoneSystem.Models.CadastroRestModel
<script type="text/javascript" language="javascript">
    
    function btnNovoOnClick(s, e) {
        window.location.replace('@Model.UrlNew');
        $.ajax({
            url: "@Model.UrlNew",
            sucess: function (response) {
                $('#contentBody').html(response);
            }
        });
    }

   
    function btnAtualizarOnClick(s, e) {
        $.ajax({
            url: "@Model.UrlUpdate",
            sucess: function (response) {
                $('#contentBody').html(response);
            }
        });
    }
</script>
<div id="divRest">
    <div class="form-group">
        <table>
            <tr>
                <td>
                    <div class="col-md-offset-2 col-md-10">
                        <input type="button" value="Novo" class="btn btn-default"
                               id="btnNovo" onclick="btnNovoOnClick" />
                    </div>
                </td>
                <td>
                    <div class="col-md-offset-2 col-md-10">
                        <input type="button" value="Editar" class="btn btn-default"
                               id="btnAtualizar" onclick="btnAtualizarOnClick" />
                    </div>
                </td>

            </tr>
        </table>


    </div>
</div>
